import 'package:boss/models/role.dart';
import 'package:boss/models/staff.dart';
import 'package:flutter/material.dart';

class StaffDetailProvider extends ChangeNotifier {
  Staff staff;

  StaffDetailProvider({Staff staff}) {
    this.staff = staff ?? Staff.fromJson({});
  }

  setStaffGender(int gender) {
    staff.gender = gender;
    notifyListeners();
  }

  setStaffFullTimeJob(int fullTimeJob) {
    staff.isFulltimeJob = fullTimeJob;
    notifyListeners();
  }

  setStaffRole(Role role) {
    staff.roleName = role.roleName;
    staff.roleId = role.roleId;
    notifyListeners();
  }
}
